
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Module · classbro-teacher-web</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Gj">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism-tomorrow.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../index.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="getters.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../">
            
                <a href="../">
            
                    
                    index
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    枚举
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../utils/enum.html">
            
                <a href="../utils/enum.html">
            
                    
                    Enum
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    配置文件
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../cfg/stage.html">
            
                <a href="../cfg/stage.html">
            
                    
                    阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../cfg/table.html">
            
                <a href="../cfg/table.html">
            
                    
                    表格
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    Vuex
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.5.1" data-path="dissertation.html">
            
                <a href="dissertation.html">
            
                    
                    Module
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="getters.html">
            
                <a href="getters.html">
            
                    
                    Getters
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    组件
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../components/title.html">
            
                <a href="../components/title.html">
            
                    
                    Title
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" >
            
                <span>
            
                    
                    模态框
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.2.1" data-path="../components/modal/addClass.html">
            
                <a href="../components/modal/addClass.html">
            
                    
                    添加课堂
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.2" data-path="../components/modal/adjustClass.html">
            
                <a href="../components/modal/adjustClass.html">
            
                    
                    调整课堂
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.3" data-path="../components/modal/arrangeClass.html">
            
                <a href="../components/modal/arrangeClass.html">
            
                    
                    排课
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.4" data-path="../components/modal/grade.html">
            
                <a href="../components/modal/grade.html">
            
                    
                    论文评级
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.5" data-path="../components/modal/materialList.html">
            
                <a href="../components/modal/materialList.html">
            
                    
                    文件材料列表
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.3" >
            
                <span>
            
                    
                    阶段
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.3.1" data-path="../components/stage/">
            
                <a href="../components/stage/">
            
                    
                    主文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3.2" data-path="../components/stage/row.html">
            
                <a href="../components/stage/row.html">
            
                    
                    行组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3.3" data-path="../components/stage/summary.html">
            
                <a href="../components/stage/summary.html">
            
                    
                    阶段总结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.4" >
            
                <span>
            
                    
                    表格
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.4.1" data-path="../components/table/">
            
                <a href="../components/table/">
            
                    
                    主文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.2" data-path="../components/table/header.html">
            
                <a href="../components/table/header.html">
            
                    
                    标题栏
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.3" data-path="../components/table/table.html">
            
                <a href="../components/table/table.html">
            
                    
                    表格
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.4" data-path="../components/table/rightRow.html">
            
                <a href="../components/table/rightRow.html">
            
                    
                    右侧功能栏
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.5" data-path="../components/table/material.html">
            
                <a href="../components/table/material.html">
            
                    
                    表格详情栏
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.6" data-path="../components/table/arrangeClass.html">
            
                <a href="../components/table/arrangeClass.html">
            
                    
                    左侧排课
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >Module</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x89C4;&#x5212;&#x8868;-vuex">&#x89C4;&#x5212;&#x8868; Vuex</h1>
<blockquote>
<p>&#x76EE;&#x5F55; <strong>src/store/modules/dissertation.js</strong></p>
</blockquote>
<pre class="language-"><code class="lang-javascript"><span class="token keyword">import</span> <span class="token punctuation">{</span>
    paper_stage<span class="token punctuation">,</span>
    paper_teacherRate<span class="token punctuation">,</span>
    crmStageTable<span class="token punctuation">,</span>
    crmTeacherRate
<span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&quot;@/views/dissertation/api&quot;</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> DissertationRouterPath<span class="token punctuation">,</span> Storage<span class="token punctuation">,</span> HeaderStatused <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&quot;@/utils/VEnum&quot;</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> _ <span class="token keyword">from</span> <span class="token string">&quot;lodash&quot;</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> Router <span class="token keyword">from</span> <span class="token string">&quot;@/router&quot;</span><span class="token punctuation">;</span>

<span class="token keyword">function</span> <span class="token function">cacheIdAndStatus</span><span class="token punctuation">(</span><span class="token parameter"><span class="token punctuation">{</span> courseId<span class="token punctuation">,</span> readonly <span class="token punctuation">}</span></span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    localStorage<span class="token punctuation">.</span><span class="token function">removeItem</span><span class="token punctuation">(</span>Storage<span class="token punctuation">.</span><span class="token constant">COURSE_ID</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    localStorage<span class="token punctuation">.</span><span class="token function">removeItem</span><span class="token punctuation">(</span>Storage<span class="token punctuation">.</span><span class="token constant">READ_ONLY</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    localStorage<span class="token punctuation">.</span><span class="token function">setItem</span><span class="token punctuation">(</span>Storage<span class="token punctuation">.</span><span class="token constant">COURSE_ID</span><span class="token punctuation">,</span> courseId<span class="token punctuation">)</span><span class="token punctuation">;</span>
    localStorage<span class="token punctuation">.</span><span class="token function">setItem</span><span class="token punctuation">(</span>Storage<span class="token punctuation">.</span><span class="token constant">READ_ONLY</span><span class="token punctuation">,</span> readonly<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">function</span> <span class="token function">getReadonly</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">const</span> readonly <span class="token operator">=</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">parse</span><span class="token punctuation">(</span>localStorage<span class="token punctuation">.</span><span class="token function">getItem</span><span class="token punctuation">(</span>Storage<span class="token punctuation">.</span><span class="token constant">READ_ONLY</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> readonly<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">function</span> <span class="token function">getCourseId</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">const</span> courseId <span class="token operator">=</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">parse</span><span class="token punctuation">(</span>localStorage<span class="token punctuation">.</span><span class="token function">getItem</span><span class="token punctuation">(</span>Storage<span class="token punctuation">.</span><span class="token constant">COURSE_ID</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> courseId<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">const</span> state <span class="token operator">=</span> <span class="token punctuation">{</span>
    disabled<span class="token operator">:</span> <span class="token boolean">false</span> <span class="token comment">/* &#x62D6;&#x62FD;&#x7EC4;&#x4EF6; &#x7981;&#x7528; */</span><span class="token punctuation">,</span>
    tables<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token comment">/* &#x8868;&#x683C;&#x7EC4;&#x4EF6;&#x6570;&#x636E; */</span><span class="token punctuation">,</span>
    stages<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token comment">/* &#x9636;&#x6BB5;&#x7EC4;&#x4EF6;&#x6570;&#x636E; */</span><span class="token punctuation">,</span>
    titleData<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span> <span class="token comment">/* &#x6807;&#x9898;&#x7EC4;&#x4EF6;&#x6570;&#x636E; */</span><span class="token punctuation">,</span>
    rate<span class="token operator">:</span> <span class="token keyword">null</span> <span class="token comment">/* &#x6709;&#x503C;&#x5DF2;&#x7ECF;&#x8BC4;&#x7EA7;&#xFF0C;&#x7A7A;&#x5219;&#x6CA1;&#x6709;&#x8BC4;&#x7EA7; */</span><span class="token punctuation">,</span>
    stageLoading<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
    progressOver<span class="token operator">:</span> <span class="token boolean">false</span> <span class="token comment">/* &#x603B;&#x8FDB;&#x5C55;&#x662F;&#x5426;&#x5DF2;&#x7ECF;&#x7ED3;&#x675F; */</span><span class="token punctuation">,</span>
    courseId<span class="token operator">:</span> <span class="token function">getCourseId</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token comment">/* &#x8BA2;&#x5355;id */</span><span class="token punctuation">,</span>
    readonly<span class="token operator">:</span> <span class="token function">getReadonly</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token comment">/* &#x4E0D;&#x5141;&#x8BB8;&#x64CD;&#x4F5C; */</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>

<span class="token keyword">const</span> mutations <span class="token operator">=</span> <span class="token punctuation">{</span>
    <span class="token function-variable function">DISABLED</span><span class="token operator">:</span> <span class="token punctuation">(</span><span class="token parameter">state<span class="token punctuation">,</span> bool</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
        state<span class="token punctuation">.</span>disabled <span class="token operator">=</span> bool<span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token function-variable function">UPDATE_STAGES</span><span class="token operator">:</span> <span class="token punctuation">(</span><span class="token parameter">state<span class="token punctuation">,</span> list</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
        state<span class="token punctuation">.</span>stages <span class="token operator">=</span> list<span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>

<span class="token keyword">const</span> actions <span class="token operator">=</span> <span class="token punctuation">{</span>
    <span class="token function">setDisabled</span><span class="token punctuation">(</span><span class="token parameter"><span class="token punctuation">{</span> commit <span class="token punctuation">}</span><span class="token punctuation">,</span> bool</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token function">commit</span><span class="token punctuation">(</span><span class="token string">&quot;DISABLED&quot;</span><span class="token punctuation">,</span> bool<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token comment">/**&#x6570;&#x636E;&#x91CD;&#x65B0;&#x83B7;&#x53D6;&#xFF0C;&#x5E76;cache */</span>
    <span class="token keyword">async</span> <span class="token function">reload</span><span class="token punctuation">(</span><span class="token parameter"><span class="token punctuation">{</span> state <span class="token punctuation">}</span></span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        state<span class="token punctuation">.</span>stageLoading <span class="token operator">=</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
        <span class="token keyword">let</span> body<span class="token punctuation">,</span> status<span class="token punctuation">;</span>
        <span class="token keyword">const</span> isCrm <span class="token operator">=</span> localStorage<span class="token punctuation">.</span><span class="token function">getItem</span><span class="token punctuation">(</span>Storage<span class="token punctuation">.</span><span class="token constant">CRM_LINK_DISS</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>isCrm<span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">const</span> res <span class="token operator">=</span> <span class="token keyword">await</span> <span class="token function">crmStageTable</span><span class="token punctuation">(</span><span class="token punctuation">{</span> courseId<span class="token operator">:</span> state<span class="token punctuation">.</span>courseId <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            status <span class="token operator">=</span> res<span class="token punctuation">.</span>status<span class="token punctuation">;</span>
            body <span class="token operator">=</span> res<span class="token punctuation">.</span>body<span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
            <span class="token keyword">const</span> res <span class="token operator">=</span> <span class="token keyword">await</span> <span class="token function">paper_stage</span><span class="token punctuation">(</span><span class="token punctuation">{</span> id<span class="token operator">:</span> state<span class="token punctuation">.</span>courseId <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            status <span class="token operator">=</span> res<span class="token punctuation">.</span>status<span class="token punctuation">;</span>
            body <span class="token operator">=</span> res<span class="token punctuation">.</span>body<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        state<span class="token punctuation">.</span>stageLoading <span class="token operator">=</span> <span class="token boolean">false</span><span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>status <span class="token operator">===</span> <span class="token number">200</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            state<span class="token punctuation">.</span>tables <span class="token operator">=</span> body<span class="token punctuation">;</span>
            state<span class="token punctuation">.</span>stages <span class="token operator">=</span> body<span class="token punctuation">.</span><span class="token function">map</span><span class="token punctuation">(</span><span class="token parameter">item</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
                <span class="token keyword">return</span> <span class="token punctuation">{</span>
                    <span class="token operator">...</span>item<span class="token punctuation">,</span>
                    contain<span class="token operator">:</span> item<span class="token punctuation">.</span>stageClass
                        <span class="token punctuation">.</span><span class="token function">map</span><span class="token punctuation">(</span><span class="token parameter">stage</span> <span class="token operator">=&gt;</span> stage<span class="token punctuation">.</span>className<span class="token punctuation">)</span>
                        <span class="token punctuation">.</span><span class="token function">join</span><span class="token punctuation">(</span><span class="token string">&quot;&#x3001;&quot;</span><span class="token punctuation">)</span>
                <span class="token punctuation">}</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token comment">/** &#x89C4;&#x5212;&#x8868; title&#x6570;&#x636E;&#x83B7;&#x53D6;&#xFF0C;&#x5E76;cache */</span>
    <span class="token keyword">async</span> <span class="token function">initTitle</span><span class="token punctuation">(</span><span class="token parameter"><span class="token punctuation">{</span> state <span class="token punctuation">}</span></span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">let</span> body<span class="token punctuation">,</span> status<span class="token punctuation">;</span>
        <span class="token keyword">const</span> isCrm <span class="token operator">=</span> localStorage<span class="token punctuation">.</span><span class="token function">getItem</span><span class="token punctuation">(</span>Storage<span class="token punctuation">.</span><span class="token constant">CRM_LINK_DISS</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>isCrm<span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">const</span> res <span class="token operator">=</span> <span class="token keyword">await</span> <span class="token function">crmTeacherRate</span><span class="token punctuation">(</span><span class="token punctuation">{</span> courseId<span class="token operator">:</span> state<span class="token punctuation">.</span>courseId <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            status <span class="token operator">=</span> res<span class="token punctuation">.</span>status<span class="token punctuation">;</span>
            body <span class="token operator">=</span> res<span class="token punctuation">.</span>body<span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
            <span class="token keyword">const</span> res <span class="token operator">=</span> <span class="token keyword">await</span> <span class="token function">paper_teacherRate</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
                courseId<span class="token operator">:</span> state<span class="token punctuation">.</span>courseId
            <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            status <span class="token operator">=</span> res<span class="token punctuation">.</span>status<span class="token punctuation">;</span>
            body <span class="token operator">=</span> res<span class="token punctuation">.</span>body<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>status <span class="token operator">===</span> <span class="token number">200</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token keyword">const</span> <span class="token punctuation">{</span> <span class="token constant">OVER</span><span class="token punctuation">,</span> <span class="token constant">ERR_OVER</span> <span class="token punctuation">}</span> <span class="token operator">=</span> HeaderStatused<span class="token punctuation">;</span>
            <span class="token keyword">const</span> <span class="token punctuation">{</span>
                schedule<span class="token punctuation">,</span>
                dealDeadline<span class="token punctuation">,</span>
                officialDeadline<span class="token punctuation">,</span>
                statused<span class="token punctuation">,</span>
                rate
            <span class="token punctuation">}</span> <span class="token operator">=</span> body<span class="token punctuation">;</span>
            state<span class="token punctuation">.</span>titleData <span class="token operator">=</span> <span class="token punctuation">{</span>
                schedule<span class="token operator">:</span> Math<span class="token punctuation">.</span><span class="token function">round</span><span class="token punctuation">(</span><span class="token operator">+</span>schedule <span class="token operator">*</span> <span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
                dealDeadline<span class="token punctuation">,</span>
                officialDeadline<span class="token punctuation">,</span>
                statused<span class="token punctuation">,</span>
                rate
            <span class="token punctuation">}</span><span class="token punctuation">;</span>
            state<span class="token punctuation">.</span>progressOver <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token constant">OVER</span><span class="token punctuation">,</span> <span class="token constant">ERR_OVER</span><span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token function">includes</span><span class="token punctuation">(</span><span class="token operator">+</span>statused<span class="token punctuation">)</span><span class="token punctuation">;</span>
            state<span class="token punctuation">.</span>rate <span class="token operator">=</span> rate<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
       <span class="token comment">/** &#x8DF3;&#x8F6C;&#x5230;&#x89C4;&#x5212;&#x8868; */</span>
    <span class="token keyword">async</span> <span class="token function">gotoDissertation</span><span class="token punctuation">(</span><span class="token parameter"><span class="token punctuation">{</span> state <span class="token punctuation">}</span><span class="token punctuation">,</span> data</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">const</span> <span class="token punctuation">{</span> courseId<span class="token punctuation">,</span> readonly <span class="token punctuation">}</span> <span class="token operator">=</span> data<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>_<span class="token punctuation">.</span><span class="token function">isNil</span><span class="token punctuation">(</span>courseId<span class="token punctuation">)</span> <span class="token operator">||</span> _<span class="token punctuation">.</span><span class="token function">isNil</span><span class="token punctuation">(</span>readonly<span class="token punctuation">)</span><span class="token punctuation">)</span>
            <span class="token keyword">throw</span> <span class="token string">&quot;courseId or readonly is Nil&quot;</span><span class="token punctuation">;</span>
        <span class="token function">cacheIdAndStatus</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
            courseId<span class="token punctuation">,</span>
            readonly
        <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">const</span> __router <span class="token operator">=</span> Router<span class="token punctuation">.</span><span class="token function">resolve</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
            path<span class="token operator">:</span> DissertationRouterPath<span class="token punctuation">.</span><span class="token constant">HOME</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        window<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span>__router<span class="token punctuation">.</span>href<span class="token punctuation">,</span> <span class="token string">&quot;_blank&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token comment">/* crm&#x7CFB;&#x7EDF;&#x8DF3;&#x8F6C;&#x8FDB;&#x5165;&#x89C4;&#x5212;&#x8868; */</span>
    <span class="token keyword">async</span> <span class="token function">crmGotoDissertation</span><span class="token punctuation">(</span><span class="token parameter"><span class="token punctuation">{</span> state <span class="token punctuation">}</span><span class="token punctuation">,</span> data</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">const</span> <span class="token punctuation">{</span> courseId <span class="token punctuation">}</span> <span class="token operator">=</span> data<span class="token punctuation">;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>_<span class="token punctuation">.</span><span class="token function">isNil</span><span class="token punctuation">(</span>courseId<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token keyword">throw</span> <span class="token string">&quot;courseId is Nil&quot;</span><span class="token punctuation">;</span>
        <span class="token function">cacheIdAndStatus</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
            courseId<span class="token punctuation">,</span>
            readonly<span class="token operator">:</span> <span class="token boolean">true</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        Router<span class="token punctuation">.</span><span class="token function">push</span><span class="token punctuation">(</span>DissertationRouterPath<span class="token punctuation">.</span><span class="token constant">HOME</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>

<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
    namespaced<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
    state<span class="token punctuation">,</span>
    mutations<span class="token punctuation">,</span>
    actions
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="getters.html" class="navigation navigation-next navigation-unique" aria-label="Next page: Getters">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Module","level":"1.5.1","depth":2,"next":{"title":"Getters","level":"1.5.2","depth":2,"path":"src/vuex/getters.md","ref":"src/vuex/getters.md","articles":[]},"previous":{"title":"Vuex","level":"1.5","depth":1,"ref":"","articles":[{"title":"Module","level":"1.5.1","depth":2,"path":"src/vuex/dissertation.md","ref":"src/vuex/dissertation.md","articles":[]},{"title":"Getters","level":"1.5.2","depth":2,"path":"src/vuex/getters.md","ref":"src/vuex/getters.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["expandable-chapters","-lunr","-search","search-pro","-highlight","prism","livereload"],"styles":{"website":"index.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-tomorrow.css"]},"expandable-chapters":{},"search-pro":{},"livereload":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Gj","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"classbro-teacher-web","language":"zh-hans","gitbook":"3.2.3","description":"讲师端毕业论文-规划表"},"file":{"path":"src/vuex/dissertation.md","mtime":"2020-07-29T07:00:20.220Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-07-29T03:31:44.693Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

